{% extends "home.html" %}


{% block title %} Update your book - {{ block.super }} {% endblock %}

{% block ads%}
{% endblock %}


{% block formspage %}


{% ifequal next 'no' %}

<form method="POST" action ="{% url book_update book_id=book_id dontvalidate='no' %}"> 

<fieldset>
   <legend>Update your book</legend>
                       
    {% for field in bookform %}
       
       {% if field.errors %}  
       <div class="clearfix error">
            {{ field.label_tag }}
            <div class="input">
              {{ field }}
             {% for error in field.errors %} 
             <span class="help-inline">
              {{ error }}</span>
            </div>
             {% endfor %}
        </div> 
       {% else %}          
  
        <div class="clearfix">
          {{ field.label_tag }}
          <div class="input">
           {{ field }}
          </div>
        </div>
       {% endif %}
    {% endfor %}
 
    <div class="clearfix">
     <div class="input">
       <input  type="submit" class="btn" value=" Update " >
     </div>
    </div>

</fieldset>

</form>

{% endifequal %}

{% ifequal next 'yes' %}

 your book is updated , <a href="{% url thought_refs %}">go back to the list ?</a> 

{% endifequal %}

{% endblock %}

